import Vue from "vue";
import VueRouter from "vue-router";
import Item from "./views/Item.vue";
import Late from "./views/Late.vue";
import Home from "./views/Home.vue";
import Change from "./views/Change.vue";
import Dashboard from "./views/Dashboard.vue";
import Statistic from "./views/Statistic.vue";
import Expired from "./views/Expired.vue";
Vue.use(VueRouter);
const routes = [
  {
    name: "home",
    path: "/home",
    redirect: "/home/dashboard",
    component: Home,
    children: [
      {
        path: "item",
        component: Item,
      },
      {
        path: "late",
        component: Late,
      },
      {
        path: "dashboard",
        component: Dashboard,
      },
      {
        path: "statistic",
        component: Statistic,
      },{
        path: "Expired",
        component: Expired,
      }
    ],
  },
  {
    path: "/item",
    component: Item,
  },
  {
    path: "/late",
    component: Late,
  },
  {
    path: "/change",
    component: Change,
  },
  {
    path: "/Expired",
    component: Expired,
  },
  {
    path: "/",
    redirect: "/home",
  },
];
const router = new VueRouter({
  routes,
  // mode: "hash"
});

export default router;
